﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    Lang lang = ViewBag.Lang;
    ViewBag.Title = "Booking";
    int iAdult = @ViewBag.Adult;
    int iChild = @ViewBag.Child;
    int iBaby = @ViewBag.Baby;
    var tDepart = (TGVR_Boot.DTO.TicketDTO)ViewBag.tDepart;

    var tReturn = (TGVR_Boot.DTO.TicketDTO)ViewBag.tReturn;
}
<style>
    #f-info
    {
        width: 650px;
        float: left;
    }
    #flight-info
    {
        background: lavender;
        overflow: auto;
        line-height: 20px;
    }
    #flight-info .block.label
    {
        width: 17%;
    }
    #flight-info .block.detail
    {
        width: 32%;
    }
    #flight-info .block.img img, #flight-info .block.img
    {
        width: 70px;
    }
    #customer-info span
    {
        width: 77px;
        display: inline-block;
    }
    fieldset
    {
        padding: 10px 0;
    }
    #note-info textarea
    {
        width: 99%;
        border-color: lavender;
    }
    .f-time
    {
        font-size: 23px;
    }
</style>
<div id="f-info">
    <form method="post" action="/flightsearch/checkout" onsubmit="return onValidate()">
    <h2>@lang.FLIGHTINFO</h2>
    <div id="flight-info">
        <div class="block left img">
            <img alt="img" src="/Content/Images/icon/flight-icon.png" title="@lang.FLIGHTINFO"/>
        </div>
        <div class="block left label">
            <div>@lang.THEFILGHT:
            </div>
            <div>@lang.STARTDATE:
            </div>
            <div>@lang.FROMCITY:
            </div>
        </div>
        <div class="block left label">
            <b>
                <div>
                    @if (tReturn != null)
                    { @lang.TWOWAY }
                    else
                    { @lang.ONEWAY}</div>
                <div>@(((DateTime)ViewBag.DatePickerDepartDate).ToString("dd/MM/yyyy"))</div>
                <div>@ViewBag.fromcity</div>
            </b>
        </div>
        <div class="block left label">
            <div>@lang.AMOUNT:
            </div>
            <div>@lang.RETURNDATE:
            </div>
            <div>@lang.TOCITY:
            </div>
        </div>
        <div class="block left detail">
            <b>
                <div>@ViewBag.Adult @lang.ADULT, @ViewBag.Child @lang.CHILD, @ViewBag.Baby @lang.BABY</div>
                <div>
                    @if (tReturn != null)
                    {<text>@(((DateTime)ViewBag.DatePickerReturnDate).ToString("dd/MM/yyyy"))</text>}
                    else
                    {
                        <text> &nbsp;
                        </text>
                    }
                </div>
                <div>@ViewBag.tocity</div>
            </b>
        </div>
    </div>
    <br />
    @Html.Partial("Partials/ListTicket")
    <h2>@lang.PASSENGER</h2>
    <div id="passenger-info">
        @{int index = 0;}
        @if (iAdult > 0)
        {
            <fieldset>
                <legend>@lang.ADULT</legend>
                @for (int i = 0; i < iAdult; i++)
                {
                    <text>
                    <div class="combo-input clear">
                        <table>
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                @lang.SEX
                                            </td>
                                            <td>
                                                <select name="Passenger[@index].Sex" required = "required">
                                                    <option value="M">@lang.MALE</option>
                                                    <option value="F">@lang.FEMALE</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>@Html.Raw(lang.FIRSTNAMEMORE) <b style="color: red">*</b>
                                            </td>
                                            <td>
                                                <input class="input" id="firstname1" name="Passenger[@index].FirstName" required = "required" onkeyup="onUpper()" onblur="onFinishName()"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>@Html.Raw(lang.NAMEMORE) <b style="color: red">*</b>
                                            </td>
                                            <td>
                                                <input class="input" id="name1" name="Passenger[@index].Name" required = "required" onkeyup="onUpper1()" onblur="onFinishName()"/>
                                            </td>
                                        </tr>
                                        
                                        @*<tr>
                                            <td>
                                                @lang.EMAIL <b style="color: red">*</b>
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Email" value="thegioivere@gmail.com" required = "required" type="email"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                @lang.PHONE <b style="color: red">*</b>
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Phone" value="0938546779" required = "required" type="number"/>
                                            </td>
                                        </tr>*@
                                    </table>
                                </td>
                                <td style="display:none">
                                    <table>
                                        <tr>
                                            <td>@lang.BIRTH
                                            </td>
                                            <td>@(Html.Telerik().DatePicker()
                                        .Name("Passenger[" + @index + "].Birthday")
                                         .HtmlAttributes(new { @class = "input datetime", required = "required", type = "datetime" })
                                        .ShowButton(true)
                                        .OpenOnFocus(true)
                                        .Value(new DateTime(1991, 2, 27))
                                        .Format("dd/MM/yyyy"))
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                @lang.ADDRESS
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Address" value="90 La Xuan Oai, Quan 9, Tp Ho Chi Minh" required = "required" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>@lang.CITY
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].City" value="HCM" required = "required" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                @lang.PROVINE
                                            </td>
                                            <td>
                                                <select name="Passenger[@index].TK_ProvineID" >
                                                    <option value="-1"></option>
                                                    <option value="10245">An Giang</option>
                                                    <option value="10246">Ba Ria - Vung Tau</option>
                                                    <option value="10249">Bac Giang</option>
                                                    <option value="10248">Bac Kan</option>
                                                    <option value="10247">Bac Lieu</option>
                                                    <option value="10250">Bac Ninh</option>
                                                    <option value="10251">Ben Tre</option>
                                                    <option value="10253">Binh Dinh</option>
                                                    <option value="10252">Binh Duong</option>
                                                    <option value="10254">Binh Phuoc</option>
                                                    <option value="10255">Binh Thuan</option>
                                                    <option value="10256">Ca Mau</option>
                                                    <option value="10258">Can Tho</option>
                                                    <option value="10257">Cao Bang</option>
                                                    <option value="10243">Da Nang</option>
                                                    <option value="10259">Dac Lak</option>
                                                    <option value="10260">Dac Nong</option>
                                                    <option value="10261">Dien Bien</option>
                                                    <option value="10262">Dong Nai</option>
                                                    <option value="10263">Dong Thap</option>
                                                    <option value="10264">Gia Lai</option>
                                                    <option value="10265">Ha Giang</option>
                                                    <option value="10266">Ha Nam</option>
                                                    <option value="10242">Ha Noi</option>
                                                    <option value="10267">Ha Tay</option>
                                                    <option value="10268">Ha Tinh</option>
                                                    <option value="10269">Hai Duong</option>
                                                    <option value="10270">Hai Phong</option>
                                                    <option value="10271">Hau Giang</option>
                                                    <option value="10241" selected>Ho Chi Minh City</option>
                                                    <option value="10272">Hoa Binh</option>
                                                    <option value="10244">Hue</option>
                                                    <option value="10273">Hung Yen</option>
                                                    <option value="10274">Khanh Hoa</option>
                                                    <option value="10275">Kien Giang</option>
                                                    <option value="10276">Kon Tum</option>
                                                    <option value="10277">Lai Chau</option>
                                                    <option value="10278">Lam Dong</option>
                                                    <option value="10279">Lang Son</option>
                                                    <option value="10280">Lao Cai</option>
                                                    <option value="10281">Long An</option>
                                                    <option value="10230">NA</option>
                                                    <option value="10282">Nam Dinh</option>
                                                    <option value="10283">Nghe An</option>
                                                    <option value="10284">Ninh Binh</option>
                                                    <option value="10285">Ninh Thuan</option>
                                                    <option value="10286">Phu Tho</option>
                                                    <option value="10287">Phu Yen</option>
                                                    <option value="10288">Quang Binh</option>
                                                    <option value="10289">Quang Nam</option>
                                                    <option value="10290">Quang Ngai</option>
                                                    <option value="10291">Quang Ninh</option>
                                                    <option value="10292">Quang Tri</option>
                                                    <option value="10293">Soc Trang</option>
                                                    <option value="10294">Son La</option>
                                                    <option value="10295">Tay Ninh</option>
                                                    <option value="10296">Thai Binh</option>
                                                    <option value="10297">Thai Nguyen</option>
                                                    <option value="10298">Thanh Hoa</option>
                                                    <option value="10299">Tien Giang</option>
                                                    <option value="10300">Tra Vinh</option>
                                                    <option value="10301">Tuyen Quang</option>
                                                    <option value="10302">Vinh Long</option>
                                                    <option value="10303">Vinh Phuc</option>
                                                    <option value="10304">Yen Bai</option>
                                                </select>
                                            </td>
                                            <input type="hidden" name="Passenger[@index].TK_CountryID" value="234"/>
                                        </tr>
                                        @*<tr>
                                            <td>
                                                @lang.COUNTRY
                                            </td>
                                            <td>
                                                <select name="Passenger[@index].TK_CountryID"  readonly>
                                                    <option value="234" selected>Vietnam</option>
                                                </select>
                                            </td>
                                        </tr>*@
                                    </table>
                                </td>
                            </tr>
                        </table>
                        <input type="hidden" name="Passenger[@index].TypeID" value="1" />
                    </div>
                    </text>
                    index++;
                }
            </fieldset>
        }
        @if (iChild > 0)
        {
            <fieldset>
                <legend>@lang.CHILD</legend>
                @for (int i = 0; i < iChild; i++)
                {
                    <div class="combo-input clear">
                        <table>
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                @lang.SEX
                                            </td>
                                            <td>
                                                <select name="Passenger[@index].Sex" required = "required">
                                                    <option value="M">@lang.MALE</option>
                                                    <option value="F">@lang.FEMALE</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>@Html.Raw(lang.FIRSTNAME) <b style="color: red">*</b>
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].FirstName" required = "required" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>@Html.Raw(lang.NAME) <b style="color: red">*</b>
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Name" required = "required" />
                                            </td>
                                        </tr>
                                        
                                        <tr>
                                        @*    <td>
                                                @lang.EMAIL
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Email" value="thegioivere@gmail.com" required = "required" type="email"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                @lang.PHONE
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Phone" value="0938546779" required = "required" type="number"/>
                                            </td>
                                        </tr>*@
                                    </table>
                                </td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>@lang.BIRTH
                                            </td>
                                            <td>@(Html.Telerik().DatePicker()
                                        .Name("Passenger[" + @index + "].Birthday")
                                         .HtmlAttributes(new { @class = "input datetime", required = "required", type = "datetime" })
                                        .ShowButton(true)
                                        .OpenOnFocus(true)
                .Min(tReturn == null ? tDepart.DateStart.AddYears(-12) : tReturn.DateStart.AddYears(-12))
                .Max(tReturn == null ? tDepart.DateStart.AddYears(-2) : tReturn.DateStart.AddYears(-2))
                .Value(tReturn == null ? tDepart.DateStart.AddYears(-12) : tReturn.DateStart.AddYears(-12))
                                        .Format("dd/MM/yyyy"))
                                                <b style="color: red">*</b>
                                            </td>
                                        </tr>
                                        <tr style="display:none">
                                            <td>
                                                @lang.ADDRESS
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Address" value="90 La Xuan Oai, Quan 9, Tp Ho Chi Minh" required = "required" />
                                            </td>
                                        </tr>
                                        <tr style="display:none">
                                            <td>@lang.CITY
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].City" value="HCM" required = "required" />
                                            </td>
                                        </tr>
                                        <tr style="display:none">
                                            <td>
                                                @lang.PROVINE
                                            </td>
                                            <td>
                                                <select name="Passenger[@index].TK_ProvineID" >
                                                    <option value="-1"></option>
                                                    <option value="10245">An Giang</option>
                                                    <option value="10246">Ba Ria - Vung Tau</option>
                                                    <option value="10249">Bac Giang</option>
                                                    <option value="10248">Bac Kan</option>
                                                    <option value="10247">Bac Lieu</option>
                                                    <option value="10250">Bac Ninh</option>
                                                    <option value="10251">Ben Tre</option>
                                                    <option value="10253">Binh Dinh</option>
                                                    <option value="10252">Binh Duong</option>
                                                    <option value="10254">Binh Phuoc</option>
                                                    <option value="10255">Binh Thuan</option>
                                                    <option value="10256">Ca Mau</option>
                                                    <option value="10258">Can Tho</option>
                                                    <option value="10257">Cao Bang</option>
                                                    <option value="10243">Da Nang</option>
                                                    <option value="10259">Dac Lak</option>
                                                    <option value="10260">Dac Nong</option>
                                                    <option value="10261">Dien Bien</option>
                                                    <option value="10262">Dong Nai</option>
                                                    <option value="10263">Dong Thap</option>
                                                    <option value="10264">Gia Lai</option>
                                                    <option value="10265">Ha Giang</option>
                                                    <option value="10266">Ha Nam</option>
                                                    <option value="10242">Ha Noi</option>
                                                    <option value="10267">Ha Tay</option>
                                                    <option value="10268">Ha Tinh</option>
                                                    <option value="10269">Hai Duong</option>
                                                    <option value="10270">Hai Phong</option>
                                                    <option value="10271">Hau Giang</option>
                                                    <option value="10241" selected>Ho Chi Minh City</option>
                                                    <option value="10272">Hoa Binh</option>
                                                    <option value="10244">Hue</option>
                                                    <option value="10273">Hung Yen</option>
                                                    <option value="10274">Khanh Hoa</option>
                                                    <option value="10275">Kien Giang</option>
                                                    <option value="10276">Kon Tum</option>
                                                    <option value="10277">Lai Chau</option>
                                                    <option value="10278">Lam Dong</option>
                                                    <option value="10279">Lang Son</option>
                                                    <option value="10280">Lao Cai</option>
                                                    <option value="10281">Long An</option>
                                                    <option value="10230">NA</option>
                                                    <option value="10282">Nam Dinh</option>
                                                    <option value="10283">Nghe An</option>
                                                    <option value="10284">Ninh Binh</option>
                                                    <option value="10285">Ninh Thuan</option>
                                                    <option value="10286">Phu Tho</option>
                                                    <option value="10287">Phu Yen</option>
                                                    <option value="10288">Quang Binh</option>
                                                    <option value="10289">Quang Nam</option>
                                                    <option value="10290">Quang Ngai</option>
                                                    <option value="10291">Quang Ninh</option>
                                                    <option value="10292">Quang Tri</option>
                                                    <option value="10293">Soc Trang</option>
                                                    <option value="10294">Son La</option>
                                                    <option value="10295">Tay Ninh</option>
                                                    <option value="10296">Thai Binh</option>
                                                    <option value="10297">Thai Nguyen</option>
                                                    <option value="10298">Thanh Hoa</option>
                                                    <option value="10299">Tien Giang</option>
                                                    <option value="10300">Tra Vinh</option>
                                                    <option value="10301">Tuyen Quang</option>
                                                    <option value="10302">Vinh Long</option>
                                                    <option value="10303">Vinh Phuc</option>
                                                    <option value="10304">Yen Bai</option>
                                                </select>
                                            </td>
                                            <input type="hidden" name="Passenger[@index].TK_CountryID" value="234"/>
                                        </tr>
                                        @*<tr>
                                            <td>
                                                @lang.COUNTRY
                                            </td>
                                            <td>
                                                <select name="Passenger[@index].TK_CountryID"  readonly>
                                                    <option value="234" selected>Vietnam</option>
                                                </select>
                                            </td>
                                        </tr>*@
                                    </table>
                                </td>
                            </tr>
                        </table>
                        <input type="hidden" name="Passenger[@index].TypeID" value="2" />
                    </div>
                    index++;
                }
            </fieldset>
        }
        @if (iBaby > 0)
        {
            <fieldset>
                <legend>@lang.BABY</legend>
                @for (int i = 0; i < iBaby; i++)
                {
                    <text>
                    <div class="combo-input clear">
                        <table>
                            <tr>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                @lang.SEX
                                            </td>
                                            <td>
                                                <select name="Passenger[@index].Sex" required = "required">
                                                    <option value="M">@lang.MALE</option>
                                                    <option value="F">@lang.FEMALE</option>
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>@Html.Raw(lang.FIRSTNAME) <b style="color: red">*</b>
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].FirstName" required = "required" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>@Html.Raw(lang.NAME) <b style="color: red">*</b>
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Name" required = "required" />
                                            </td>
                                        </tr>
                                        
                                        @*<tr>
                                            <td>
                                                @lang.EMAIL
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Email" value="thegioivere@gmail.com" required = "required" type="email"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                @lang.PHONE
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Phone" value="0938546779" required = "required" type="number"/>
                                            </td>
                                        </tr>*@
                                    </table>
                                </td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>@lang.BIRTH
                                            </td>
                                            <td>@(Html.Telerik().DatePicker()
                                        .Name("Passenger[" + @index + "].Birthday")
                                         .HtmlAttributes(new { @class = "input datetime", required = "required", type = "datetime" })
                                        .ShowButton(true)
                                        .OpenOnFocus(true)
                                    .Value(tReturn == null ? tDepart.DateStart.AddYears(-2) : tReturn.DateStart.AddYears(-2))
                                    .Min(tReturn == null ? tDepart.DateStart.AddYears(-2) : tReturn.DateStart.AddYears(-2))
                                    .Max(DateTime.Now)
                                        .Format("dd/MM/yyyy"))
                                                <b style="color: red">*</b>
                                            </td>
                                        </tr>
                                        <tr style="display:none">
                                            <td>
                                                @lang.ADDRESS
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].Address" value="90 La Xuan Oai, Quan 9, Tp Ho Chi Minh" required = "required" />
                                            </td>
                                        </tr>
                                        <tr style="display:none">
                                            <td>@lang.CITY
                                            </td>
                                            <td>
                                                <input class="input" name="Passenger[@index].City" value="HCM" required = "required" />
                                            </td>
                                        </tr>
                                        <tr style="display:none">
                                            <td>
                                                @lang.PROVINE
                                            </td>
                                            <td>
                                                <select name="Passenger[@index].TK_ProvineID" >
                                                    <option value="-1"></option>
                                                    <option value="10245">An Giang</option>
                                                    <option value="10246">Ba Ria - Vung Tau</option>
                                                    <option value="10249">Bac Giang</option>
                                                    <option value="10248">Bac Kan</option>
                                                    <option value="10247">Bac Lieu</option>
                                                    <option value="10250">Bac Ninh</option>
                                                    <option value="10251">Ben Tre</option>
                                                    <option value="10253">Binh Dinh</option>
                                                    <option value="10252">Binh Duong</option>
                                                    <option value="10254">Binh Phuoc</option>
                                                    <option value="10255">Binh Thuan</option>
                                                    <option value="10256">Ca Mau</option>
                                                    <option value="10258">Can Tho</option>
                                                    <option value="10257">Cao Bang</option>
                                                    <option value="10243">Da Nang</option>
                                                    <option value="10259">Dac Lak</option>
                                                    <option value="10260">Dac Nong</option>
                                                    <option value="10261">Dien Bien</option>
                                                    <option value="10262">Dong Nai</option>
                                                    <option value="10263">Dong Thap</option>
                                                    <option value="10264">Gia Lai</option>
                                                    <option value="10265">Ha Giang</option>
                                                    <option value="10266">Ha Nam</option>
                                                    <option value="10242">Ha Noi</option>
                                                    <option value="10267">Ha Tay</option>
                                                    <option value="10268">Ha Tinh</option>
                                                    <option value="10269">Hai Duong</option>
                                                    <option value="10270">Hai Phong</option>
                                                    <option value="10271">Hau Giang</option>
                                                    <option value="10241" selected>Ho Chi Minh City</option>
                                                    <option value="10272">Hoa Binh</option>
                                                    <option value="10244">Hue</option>
                                                    <option value="10273">Hung Yen</option>
                                                    <option value="10274">Khanh Hoa</option>
                                                    <option value="10275">Kien Giang</option>
                                                    <option value="10276">Kon Tum</option>
                                                    <option value="10277">Lai Chau</option>
                                                    <option value="10278">Lam Dong</option>
                                                    <option value="10279">Lang Son</option>
                                                    <option value="10280">Lao Cai</option>
                                                    <option value="10281">Long An</option>
                                                    <option value="10230">NA</option>
                                                    <option value="10282">Nam Dinh</option>
                                                    <option value="10283">Nghe An</option>
                                                    <option value="10284">Ninh Binh</option>
                                                    <option value="10285">Ninh Thuan</option>
                                                    <option value="10286">Phu Tho</option>
                                                    <option value="10287">Phu Yen</option>
                                                    <option value="10288">Quang Binh</option>
                                                    <option value="10289">Quang Nam</option>
                                                    <option value="10290">Quang Ngai</option>
                                                    <option value="10291">Quang Ninh</option>
                                                    <option value="10292">Quang Tri</option>
                                                    <option value="10293">Soc Trang</option>
                                                    <option value="10294">Son La</option>
                                                    <option value="10295">Tay Ninh</option>
                                                    <option value="10296">Thai Binh</option>
                                                    <option value="10297">Thai Nguyen</option>
                                                    <option value="10298">Thanh Hoa</option>
                                                    <option value="10299">Tien Giang</option>
                                                    <option value="10300">Tra Vinh</option>
                                                    <option value="10301">Tuyen Quang</option>
                                                    <option value="10302">Vinh Long</option>
                                                    <option value="10303">Vinh Phuc</option>
                                                    <option value="10304">Yen Bai</option>
                                                </select>
                                            </td>
                                            <input type="hidden" name="Passenger[@index].TK_CountryID" value="234"/>
                                        </tr>
                                       @* <tr>
                                            <td>
                                                @lang.COUNTRY
                                            </td>
                                            <td>
                                                <select name="Passenger[@index].TK_CountryID"  readonly>
                                                    <option value="234" selected>Vietnam</option>
                                                </select>
                                            </td>
                                        </tr>*@
                                    </table>
                                </td>
                            </tr>
                        </table>
                        <input type="hidden" name="Passenger[@index].TypeID" value="3" />
                    </div>
                    </text>
                    index++;
                }
            </fieldset>
        }
    </div>
    <div id="customer-info">
        <h2>@lang.CUSTOMERINFO</h2>
        <fieldset>
            <div class="combo-input clear">
                <span>@lang.NAME</span>
                <input class="input" id="cusname" name="Booking.Name" value="" required="required" />
                @lang.PHONE <b style='color:red'>*</b>
                <input class="input" id="phone1" name="Booking.Phone" value="" required="required"
                    type="text" />
            </div>
            <div class="combo-input clear">
                <span>@lang.EMAIL <b style='color:red'>*</b></span>
                <input class="input" name="Booking.Email" value="" required="required"
                    type="email" />
                <span>@lang.ADDRESS <b style='color:red'>*</b></span>
                <input class="input" name="Booking.Address" value="90 La Xuan Oai, Quan 9, Tp Ho Chi Minh"
                    required="required" />
            </div>
        </fieldset>
    </div>
    <div id="note-info">
        <h2>@lang.EXTRAINFO</h2>
        <textarea name="Booking.Note"></textarea>
    </div>
    <div class="clear">
        <input type="hidden" name="Booking.SessionID" value="@ViewBag.SessionID" />
        <button type="submit" style="width: 203px; height: 30px; margin: 0; margin-left: 23px;
            float: right; padding: 4px">@lang.COMPLETE</button>
    </div>
    </form>
</div>
@{
    int iPerson = Int32.Parse( ViewData["Adult"].ToString()) + Int32.Parse(ViewData["Child"].ToString());
    if (ViewData["DatePickerReturnDate"] != null)
    {
        iPerson *= 2;
    }
}
<div class="right r-margin5 r-selectedticket">

    <div class="block clear">
    </div>
    <div id="selectedticket" style=" position: relative; top:0px;right: 0px;">
        <h2>
            @lang.SELECTEDTICKET</h2>
        <hr />
        <div class="blog">
            <div class="select-out">
                <span class="l-label">@lang.OUTBOUND</span> <span class="l-price">@tDepart.Price.ToString("#,##0")</span>
            </div>
            @if (ViewData["DatePickerReturnDate"] != null)
            {
                <div class="select-in">
                    <span class="l-label">@lang.INBOUND</span> <span class="l-price">@tReturn.Price.ToString("#,##0")</span>
                </div>
            }
        </div>
        <hr />
        <div class="blog">
            <div >
                <span class="l-label">@lang.PAYMENTTYPE</span>
            </div>
            <div >
                <span class="l-label" style="font-size:14px;">@lang.PAYATHOME</span> 
                <span style="width: 105px;font-size:16px" class="l-price" value="25000">
                    <input type="radio" id="PayAtHome" value="1" name="PaymentType" @(ViewBag.PaymentType=="1"?"checked":"") onclick="calprice()"/>
                    <span style="font-size:12px;font-weight:normal">@(iPerson)x</span>25,000</span>
            </div>
            <div >
                <span class="l-label" style="font-size:14px; ">@lang.PAYATTGVR</span> 
                <span style="width:105px" class="l-price" value="0">
                    <input type="radio" name="PaymentType" value="2" @(ViewBag.PaymentType=="2"?"checked":"") onclick="calprice()"/>
                    0</span>
            </div>
        </div>
        <hr />
        <div class="blog">
            <div class="select-sum">
                <span class="l-label">@lang.SUM</span> <span class="l-price">0</span>
            </div>
        </div>
        <form id="submitBooking" method="post" action="/flightsearch/booking" onsubmit="return checkTickets()">
        <input type="hidden" name="SessionID" value="@ViewBag.Key"/>
        <input type="hidden" name="DepartTicket" id="DepartTicket" value="" />
        <input type="hidden" name="ReturnTicket" id="ReturnTicket" value="" />
        </form>
    </div>
</div>
<script>
    $('html, body').animate({
        scrollTop: $("#f-info").offset().top
    }, 2000);
    function calprice() {
        var p1 = $('.select-out .l-price').text().replace(/,/g, "");
        //alert(p1);
        var p2 = $('.select-in .l-price').text().replace(/,/g, "");
        var sum = p1 * 1 + p2 * 1;
        //sum = sum.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");.format("#,#*");

        var pay = $("#PayAtHome").attr("checked");
        var fee = 0;
        if (pay)
            fee = 25000*@(iPerson);
        sum += fee;

        $('.select-sum .l-price').html(addCommas(sum));
    }
    $(document).ready(function () {
        calprice();
    });

    function checkUnicode() {
        var inputs = $("form input:text");
        for (i = 0; i < inputs.length; i++) {
            
        }
        return true;
    }

    function onFinishName() {
        var firstname1 = $("#firstname1").val();
        var name1 = $("#name1").val();

        $("#cusname").val(firstname1 + " " + name1);
    }

    function onValidate() {
        var emails = $("input[type='email']");
        for (i = 0; i < emails.length; i++) {
            var text = $(emails[i]).val();
            if (text.indexOf('.') == -1) {
                $(emails[i]).focus();
                alert("Email không hợp lệ");
                return false;
            }
        }

        var phone = $("#phone1").val();

        if (phone.length != 10 && phone.length != 11) {
            $(emails[i]).focus();
            alert("Số điện thoại phải là 10 hoặc 11 kí tự");
            return false;
        }


        return true;
    }

    function onUpper() {
        var firstname1 = $("#firstname1").val();
        $("#firstname1").val(firstname1.toUpperCase());
    }

    function onUpper1() {
        var name1 = $("#name1").val(); ;
        $("#name1").val(name1.toUpperCase());
    }

</script>